//package com.kawaiior.asoulworld.blocks.blockAsoul;
//
//import com.kawaiior.asoulworld.IdlFramework;
//import com.kawaiior.asoulworld.blocks.BlockBase;
//import com.kawaiior.asoulworld.blocks.ModBlocks;
//import com.kawaiior.asoulworld.blocks.tileEntity.compressor.TileEntitySoulRefiner;
//import com.kawaiior.asoulworld.gui.ModGuiElementLoader;
//import com.kawaiior.asoulworld.init.ModCreativeTab;
//import com.kawaiior.asoulworld.item.ModItems;
//import com.kawaiior.asoulworld.util.IHasModel;
//import net.minecraft.block.Block;
//import net.minecraft.block.BlockContainer;
//import net.minecraft.block.SoundType;
//import net.minecraft.block.material.Material;
//import net.minecraft.block.state.IBlockState;
//import net.minecraft.entity.player.EntityPlayer;
//import net.minecraft.item.Item;
//import net.minecraft.item.ItemBlock;
//import net.minecraft.tileentity.TileEntity;
//import net.minecraft.util.EnumBlockRenderType;
//import net.minecraft.util.EnumFacing;
//import net.minecraft.util.EnumHand;
//import net.minecraft.util.math.BlockPos;
//import net.minecraft.world.World;
//import net.minecraftforge.common.capabilities.Capability;
//import net.minecraftforge.items.CapabilityItemHandler;
//import net.minecraftforge.items.IItemHandler;
//import net.minecraftforge.items.ItemStackHandler;
//
//import javax.annotation.Nonnull;
//import javax.annotation.Nullable;
//import java.util.Random;
//
//public class BlockAsoulSoulRefiner extends BlockContainer implements IHasModel {
//
//    public BlockAsoulSoulRefiner(String name, Material material) {
//        super(material);
//
//        setUnlocalizedName(name);
//        setRegistryName(name);
//        setCreativeTab(ModCreativeTab.IDL_MISC);
//
//        ModBlocks.BLOCKS.add(this);
//        ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));
//
//        setHardness(10F);
//        setResistance(1200f);
//        setHarvestLevel("pickaxe", 3);
//        setSoundType(SoundType.STONE);
//    }
//
//    @Override
//    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
//        if (worldIn.isRemote)return super.onBlockActivated(worldIn, pos, state, playerIn, hand, facing, hitX, hitY, hitZ);
//        playerIn.openGui(IdlFramework.MODID, ModGuiElementLoader.AS_SOUL_REFINER, worldIn, pos.getX(), pos.getY(), pos.getZ());
//        return true;
//    }
//
//    @Nullable
//    @Override
//    public TileEntity createNewTileEntity(World worldIn, int meta) {
//        return new TileEntitySoulRefiner();
//    }
//
//    @Override
//    public EnumBlockRenderType getRenderType(IBlockState state){
//        return EnumBlockRenderType.MODEL;
//    }
//
//    @Override
//    public void registerModels() {
//        IdlFramework.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory");
//    }
//
//    @Override
//    public void breakBlock(World world, BlockPos pos, IBlockState state){
//        TileEntity tileEntity = world.getTileEntity(pos);
//        Capability<IItemHandler> itemHandlerCapability = CapabilityItemHandler.ITEM_HANDLER_CAPABILITY;
//
//        IItemHandler up = tileEntity.getCapability(itemHandlerCapability, EnumFacing.UP);
//        IItemHandler down = tileEntity.getCapability(itemHandlerCapability, EnumFacing.DOWN);
//        IItemHandler side = tileEntity.getCapability(itemHandlerCapability, EnumFacing.NORTH);
//
//        Block.spawnAsEntity(world, pos, up.getStackInSlot(0));
//        Block.spawnAsEntity(world, pos, down.getStackInSlot(0));
//        Block.spawnAsEntity(world, pos, side.getStackInSlot(0));
//
//        super.breakBlock(world, pos, state);
//    }
//
//
//
//}
